<template>
  <div>
    <div v-for="(o, index) in 8" :key="o" class="topB6" @click="jump(index)">
      <div class="tpbb1">
        <el-image class="tpbb2" :src="imgs[index]"> </el-image>
      </div>
      <div class="tpbb3">
        <span
        class="tpbb4"
          >电影名: {{ name[index] }}</span
        >
        <span
        class="tpbb5"
          >导演: {{ director[index] }}</span
        >
        <span
        class="tpbb6"
          >主演: {{ mrole[index] }}</span
        >
        <span
        class="tpbb7"
          >语言:
          <el-tag class="tpbb8" type="primary">{{ mlanguage[index] }}</el-tag></span
        >
        <span
        class="tpbb9"
          >电影类型: {{ mtype[index] }}</span
        >
      </div>
      <div class="tpbb10">
        <span
        class="tpbb11"
          >推荐指数</span
        >
      </div>
      <div class="tpbb12">
        <span
        class="tpbb13"
          >{{ score[index] }}</span
        >
      </div>
    </div>
  </div>
</template>
<script setup>
import { ref, onMounted } from 'vue'
import router from '@/router'
import '@/assets/scss/userCom/Phone/top8.scss'
const score = ref([])
const name = ref([])
const imgs = ref([])
const director = ref([])
const mrole = ref([])
const mlanguage = ref([])
const mtype = ref([])
onMounted(() => {
  imgs.value = [
    require('@/assets/rsds.jpg'),
    require('@/assets/rsds.jpg'),
    require('@/assets/rsds.jpg'),
    require('@/assets/rsds.jpg'),
    require('@/assets/rsds.jpg'),
    require('@/assets/rsds.jpg'),
    require('@/assets/rsds.jpg'),
    require('@/assets/rsds.jpg')
  ]
  name.value = [
    '人生大事',
    '人生大事',
    '人生大事',
    '人生大事',
    '人生大事',
    '人生大事',
    '人生大事',
    '人生大事'
  ]
  director.value = ['刘江江', '刘江江', '刘江江', '刘江江', '刘江江', '刘江江', '刘江江', '刘江江']
  mrole.value = [
    '朱一龙/杨恩又',
    '朱一龙/杨恩又',
    '朱一龙/杨恩又',
    '朱一龙/杨恩又',
    '朱一龙/杨恩又',
    '朱一龙/杨恩又',
    '朱一龙/杨恩又',
    '朱一龙/杨恩又'
  ]
  mlanguage.value = ['国语', '国语', '国语', '国语', '国语', '国语', '国语', '国语']
  mtype.value = [
    '剧情 家庭',
    '剧情 家庭',
    '剧情 家庭',
    '剧情 家庭',
    '剧情 家庭',
    '剧情 家庭',
    '剧情 家庭',
    '剧情 家庭'
  ]
  score.value = [26, 26, 26, 26, 26, 26, 26, 26]
})
const jump = (index) => {
  sessionStorage.setItem('movieInfo', JSON.stringify(name.value[index]))
  router.push('/movieInfo')
}
</script>
